﻿package com.controller 
{
	import com.model.PicListProxy;
	import com.view.NumMediator;
	import com.view.WheelPicMediator;
	
	import org.puremvc.as3.interfaces.ICommand;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	/**
	 * ...
	 * @author Mr.zheng
	 */
	public class StartCommand extends SimpleCommand implements ICommand
	{
		
		public function StartCommand() 
		{
			super();
		}
		override public function execute(notification:INotification):void 
		{
			var app:WheelPic = notification.getBody() as WheelPic;
			
			facade.registerProxy(new PicListProxy(PicListProxy.NAME,new Object()));
			facade.registerMediator(new WheelPicMediator(WheelPicMediator.NAME,app));
			facade.registerMediator(new NumMediator(NumMediator.NAME));
			
			sendNotification(ApplicationFacade.STARTUP_OVER,ApplicationFacade.txtUrl);
		}
		
	}

}